import request from '@/utils/request'
export default {

  // 讲师列表
  // current当前页 limit每页记录数  teacherQuery条件对象
  getList(current, size, teacherquery) {
    return request({
      url: `/eduservice/edu-teacher/findConditionPage/${current}/${size}`,
      method: 'post',
      // teacherQuery条件对象，后端使用RequestBody获取数据
      // data把对象转换成json进行传递到接口里面
      data: teacherquery
    })
  },

  //讲师删除
  delteacher(id){
    return request({
      url: `/eduservice/edu-teacher/del/${id}`,
      method: 'delete'
    })
  },

  //讲师添加
  addteacher(eduTeacher){
    return request({
      url: `/eduservice/edu-teacher/addteacher`,
      method: 'post',
      data: eduTeacher
    })
  },

  //讲师Byid
  getById(id){
    return request({
      url: `/eduservice/edu-teacher/getById/${id}`,
      method: 'get'
    })
  },

  //讲师更新
  upset(eduTeacher){
    return request({
      url: `/eduservice/edu-teacher/setteacher`,
      method: "post",
      data: eduTeacher
    })
  }

}
